﻿namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    /// <summary>
    /// List of types of blood groups
    /// </summary>
    public class BloodGroupList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[]
        {
            "A+",
            "A-",
            "B+",
            "B-",
            "AB+",
            "AB-",
            "O+",
            "O-"
        };

        public BloodGroupList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}
